<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page contentType="text/html;charset=UTF-8"
	import="com.srit.forecast.constant.Constant"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="srit-tag" uri="/srit-constant-tag"%>
<srit-tag:Constant var="PAGE_TYPE_FORM" />
<srit-tag:Constant var="PAGE_TYPE_LIST" />
<srit-tag:Constant var="PAGE_TYPE_ALL" />
<html>
<head>
<title></title>
<link href="<c:url value="/resources/css/style.css" />" rel="stylesheet"
	type="text/css">
<link href="<c:url value="/resources/css/list_css.css" />"
	rel="stylesheet" type="text/css">
<link href="<c:url value="/resources/css/autocomplete.css" />"
	rel="stylesheet" type="text/css">
</head>

<!-- 表单页 -->
<c:if test="${pageType==PAGE_TYPE_FORM||pageType==PAGE_TYPE_ALL}">
	<div id="code-createDiv">
		<form:form commandName="code" action="/code-saveOrUpdate"
			method="post" enctype="multipart/form-data">
			<form:hidden path="id" />
			<form:hidden path="codeTypeId" />
			<table class="sritTable" align='center' id="table" width="98%">
				<tr>
					<td class="td_tl">名称</td>
					<td><form:input path="name" /></td>
					<td class="td_tl">代码</td>
					<td><form:input path="code" /></td>
				</tr>
				<tr>
					<td class="td_tl">启用</td>
					<td><label><form:radiobutton path="enabled" value="Y" />是</label>
						<label><form:radiobutton path="enabled" value="N" />否</label></td>
					<td class="td_tl">图片</td>
					<td><input type="file" name="uploadItem" /> <form:hidden
							path="image" /> <a
						href="<c:url value="/upload/${code.image}"></c:url>">图片 </a></td>
				</tr>

				<tr>
					<td colspan="4" class="td_tl">
						<c:if test="${code.id==null}">
							<input type="submit" value="保存" />
						</c:if> <c:if test="${code.id!=null }">
							<input type="submit" value="修改" />
						</c:if> <input type="reset" /></td>
				</tr>
			</table>
		</form:form>
	</div>
</c:if>

<!-- 列表页 -->
<c:if test="${pageType==PAGE_TYPE_LIST||pageType==PAGE_TYPE_ALL}">
	<div id="code-pageDiv">
		<div>
			<a href="<c:url  value="/code-form"></c:url>">创建</a>
		</div>
		<table class="sritTable" align='center' id="table" width="98%"
			style="margin-top: 5px">
			<tr>
				<th><input type="checkbox" /></th>
				<th>TYPE</th>
				<th>ENABLED</th>
				<th>操作</th>
			</tr>
			<c:forEach var="bean" items="${page.list}">
				
			</c:forEach>
		</table>
	</div>
</c:if>

</html>




